package fibonacci;

import org.junit.Before;
import org.junit.Test;
import static org.testng.Assert.assertEquals;

public class FibonacciSpec {

    private Fibonacci fibonacci;

    @Before
    public void beforeTest(){
        fibonacci = new Fibonacci();
    }

    @Test
    public void testFibonacci(){
        int cases[][] = {{0,0}, {1,1}, {2,1}, {3,2}, {4,3}, {5,5}};
        for(int i=0; i<cases.length; i++){
            assertEquals(cases[i][1], fibonacci.fib(cases[i][0]));
        }
    }
}
